﻿using System;
using System.Collections.Generic;
using System.Linq;
using Controllers;
using System.Configuration;

namespace Web
{
    public partial class EmpAwardList : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string empId = Request.QueryString["empId"];
                ApolloOaDataContext ctx = new ApolloOaDataContext(ConfigurationManager.ConnectionStrings["SqlConnectionString"].ConnectionString);
                var v = from r in ctx.EmpAwards where r.EmpId == int.Parse(empId) orderby r.AwardDate descending select r;
                rptList.DataSource = v;
                rptList.DataBind();
            }
        }
    }
}